import React from 'react';
import { Message, Button } from '@teamix/ui';
import './index.scss';
import intl from '../../../locale';

export default class Account extends React.PureComponent {
  render() {
    return (
      <Message
        title={intl.get({
          id: 'code-assets.importProjectModal.accountMessage.noRIght.AlibabaCloudAccountAuthorizationIs',
          defaultMessage:
            '由于码云的帐号授权存在失效机制，为了能够顺利访问您的码云代码库，需要您每次访问进行帐号授权。',
        })}
        type="notice"
        handler={
          <Button type="primary" text onClick={this.props.goBindAccount}>
            {intl.get({
              id: 'code-assets.importProjectModal.accountMessage.noRIght.AccountAuthorization',
              defaultMessage: '帐号授权',
            })}
          </Button>
        }
        className="bound-account-message"
      />
    );
  }
}
